import axios from 'axios';
import qs from 'qs';

 

 let base="/api";//本地代理

export const baseApi = base

export const requestLogin = params => {
    return axios.post(`${base}/auth/login`, qs.stringify(params)).then(res => res.data);
};

export const logout = params => {
    return axios.post(`${base}/auth/logout`, qs.stringify(params)).then(res => res.data);
};

export const login_message_query = params => { return axios.get(`${base}/auth/system/query_main`,  qs.stringify(params)).then(res => res.data); };//登录界面显示


export const userinfo = params => {
    return axios({
        url: `${base}/auth/user/my`,
        method: 'post',
        headers: {
            'token': params
        }
    }).then(res => res.data);
}; //添加子用户
export const menu_tree = params => {
    console.log(params)
    return axios({
        url: `${base}/auth/user/menu_tree`,
        method: 'post',
        headers: {
            'token': params.token
        }
    }).then(res => res.data);
}; //添加子用户

export const register = params => {
    return axios.post(`${base}/auth/register`, qs.stringify(params)).then(res => res.data);
};

export const code = params => {
    return axios.post(`${base}/auth/send_register_code`, qs.stringify(params)).then(res => res.data);
};

export const reset_pass = params => {
    return axios.post(`${base}/auth/reset_pass`, qs.stringify(params)).then(res => res.data);
};

export const send_reset_pass_code = params => {
    return axios.post(`${base}/auth/send_reset_pass_code`, qs.stringify(params)).then(res => res.data);
};
export const send_login_pass_code = params => {
    return axios.post(`${base}/auth/send_login_pass_code`, qs.stringify(params)).then(res => res.data);//登录验证码
};
// export const menu_tree = params => {
//     return axios.post(`${base}/auth/user/menu_tree`, qs.stringify(params)).then(res => res.data);
// };


export const query = params => {
    return axios.post(`${base}/auth/menu/query`, qs.stringify(params)).then(res => res.data);
};


export const querypost = params => { 
    return axios.post(`${base}/auth/menu/post`, qs.stringify(params)).then(res => res.data);
};

export const queryput = params => {
    return axios.post(`${base}/auth/menu/put`, qs.stringify(params)).then(res => res.data);
};

export const querydelete = params => {
    return axios.post(`${base}/auth/menu/delete`, qs.stringify(params)).then(res => res.data);
};

export const queryget = params => {
    return axios.post(`${base}/auth/menu/get`, qs.stringify(params)).then(res => res.data);
};

export const query_user = params => {
    return axios.post(`${base}/auth/user_role/query_user`, qs.stringify(params)).then(res => res.data);
};

export const query_userpost = params => {
    return axios.post(`${base}/auth/role/post`, qs.stringify(params)).then(res => res.data);
};

export const query_userput = params => {
    return axios.post(`${base}/auth/role/put`, qs.stringify(params)).then(res => res.data);
};

export const query_userdelete = params => {
    return axios.post(`${base}/auth/role/delete`, qs.stringify(params)).then(res => res.data);
};


export const query_userpermission = params => {
    return axios.post(`${base}/auth/role/permission`, qs.stringify(params)).then(res => res.data);
};

export const user_query = params => {
    return axios.post(`${base}/auth/user/query`, qs.stringify(params)).then(res => res.data);
}; //子用户列表
export const user_querycompany = params => {
    return axios.post(`${base}/auth/company/query`, qs.stringify(params)).then(res => res.data);
}; //子组织列表
export const user_add_child = params => {
    return axios({
        url: `${base}/auth/user/add_child`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //添加子用户
export const user_add_childcompany = params => {
    return axios({
        url: `${base}/auth/user/add_child_company`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //添加子组织
export const user_edit_child = params => {
    return axios.post(`${base}/auth/user/edit_child`, qs.stringify(params)).then(res => res.data);
}; //更新子用户
export const user_role_query_child_user = params => {
    return axios.post(`${base}/auth/user_role/query_child_user`, qs.stringify(params)).then(res => res.data);
}; //获取子用户信息

export const user_get_childr = params => {
    return axios.post(`${base}/auth/user/get_child`, qs.stringify(params)).then(res => res.data);
}; //获取子用户信息
export const user_delete_child = params => {
    return axios.post(`${base}/auth/user/delete_child`, qs.stringify(params)).then(res => res.data);
}; //删除子用户信息
export const user_delete_company = params => {
    return axios.post(`${base}/auth/company/delete`, qs.stringify(params)).then(res => res.data);
}; //删除组织信息
export const user_edit_child_role = params => {
    return axios.post(`${base}/auth/user/edit_child_role`, params).then(res => res.data);
}; //编辑子用户角色
//编辑角色权限
export const authorize = params => {
    return axios({
        url: `${base}/auth/role/authorize`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; 

export const userupdate = params => {
    return axios.post(`${base}/auth/user/update`, qs.stringify(params)).then(res => res.data);
}; //修改当前用户信息


export const userupdate_pass = params => {
    return axios.post(`${base}/auth/user/update_pass`, qs.stringify(params)).then(res => res.data);
}; //修改当前用户密码

export const alarms_query_user = params => {
    return axios.post(`${base}/iot/alarm_group/query_user`, qs.stringify(params)).then(res => res.data);
}; //查询告警用户

// export const alarms_post_user = params => {
//     return axios.post(`${base}/iot/alarm_group/post_user`, qs.stringify(params)).then(res => res.data);
// }; //添加告警用户

export const alarms_delete_user = params => {
    return axios({
        url: `${base}/iot/alarm_group/delete_user`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //删除告警用户


export const alarms_post_user = params => {

    return axios({
        url: `${base}/iot/alarm_group/post_user`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //添加告警用户
export const alarms_put_user = params => {

    return axios({
        url: `${base}/iot/alarm_group/put_user`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //更新告警用户


export const alarm_type_query = params => {
    return axios.post(`${base}/iot/alarm_type/query`, qs.stringify(params)).then(res => res.data);
}; //查询告警类型

export const alarm_type_post = params => {
    return axios.post(`${base}/iot/alarm_type/post`, qs.stringify(params)).then(res => res.data);
}; //新增告警类型

export const alarm_type_put = params => {
    return axios.post(`${base}/iot/alarm_type/put`, qs.stringify(params)).then(res => res.data);
}; //修改告警类型

export const alarm_type_delete = params => {
    return axios.post(`${base}/iot/alarm_type/delete`, qs.stringify(params)).then(res => res.data);
}; //删除告警类型

export const alarm_log_query = params => {
    return axios.post(`${base}/iot/alarm_log/query`, qs.stringify(params)).then(res => res.data);
}; //查询告警记录
export const alarm_log_get = params => {
    return axios.post(`${base}/iot/alarm_log/get`, qs.stringify(params)).then(res => res.data);
}; //查询告警记录
export const alarm_log_delete = params => {
    return axios.post(`${base}/iot/alarm_log/delete`,params).then(res => res.data);
}; //删除告警记录
export const alarm_log_recover = params => {
    return axios.post(`${base}/iot/alarm_log/recover`, params).then(res => res.data);
}; //处理告警

export const alarm_group_query = params => {
    return axios.post(`${base}/iot/alarm_group/query`, qs.stringify(params)).then(res => res.data);
}; //查询告警组

export const alarm_group_delete = params => {
    return axios.post(`${base}/iot/alarm_group/delete`, qs.stringify(params)).then(res => res.data);
}; //删除告警组

export const user_event_query = params => {
    return axios.post(`${base}/iot/device_event/query_user_event`, qs.stringify(params)).then(res => res.data);
}; //查询操作日志

export const alarm_group_post = params => {

    return axios({
        url: `${base}/iot/alarm_group/post`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //添加告警组

export const alarm_group_put = params => {

    return axios({
        url: `${base}/iot/alarm_group/put`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //更新告警用户

export const device_data_recipe_query = params => {
    return axios.post(`${base}/iot/device_data_recipe/query`, qs.stringify(params)).then(res => res.data);
}; //查询设备数据配方
export const device_data_recipe_post = params => {
    return axios.post(`${base}/iot/device_data_recipe/post`, params).then(res => res.data);
}; //新增设备数据配方
export const device_data_recipe_put = params => {
    return axios.post(`${base}/iot/device_data_recipe/put`,  qs.stringify(params)).then(res => res.data);
}; //更新设备数据配方
export const device_data_recipe_delete = params => {
    return axios.post(`${base}/iot/device_data_recipe/delete`,  params).then(res => res.data);
}; //删除设备数据配方
export const device_data_recipe_get = params => {
    return axios.post(`${base}/iot/device_data_recipe/get`,  qs.stringify(params)).then(res => res.data);
}; //获取设备数据配方
export const device_data_recipe_list_body = params => {
    return axios.post(`${base}/iot/device_data_recipe/list_body`,  qs.stringify(params)).then(res => res.data);
}; //获取设备数据配方内容列表
export const device_data_recipe_get_body = params => {
    return axios.post(`${base}/iot/device_data_recipe/get_body`,  qs.stringify(params)).then(res => res.data);
}; //获取设备数据配方内容
export const device_data_recipe_put_body = params => {
    return axios.post(`${base}/iot/device_data_recipe/put_body`,  params).then(res => res.data);
}; //更新设备数据配方内容
export const device_data_recipe_delete_body = params => {
    return axios.post(`${base}/iot/device_data_recipe/delete_body`,  params).then(res => res.data);
}; //删除设备数据配方内容
export const device_data_recipe_add_body = params => {
    return axios.post(`${base}/iot/device_data_recipe/add_body`,  params).then(res => res.data);
}; //新增设备数据配方内容
export const alarm_trigger_query = params => {
    return axios.post(`${base}/iot/alarm_trigger/query`, qs.stringify(params)).then(res => res.data);
}; //查询告警规则
export const alarm_trigger_get = params => {
    return axios.post(`${base}/iot/alarm_trigger/get`, qs.stringify(params)).then(res => res.data);
}; //获取单个告警规则信息
export const alarm_trigger_post = params => {

    return axios({
        url: `${base}/iot/alarm_trigger/post`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //添加告警规则
export const alarm_trigger_put = params => {

    return axios({
        url: `${base}/iot/alarm_trigger/put`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //修改告警规则
export const alarm_trigger_delete = params => {

    return axios({
        url: `${base}/iot/alarm_trigger/delete`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //删除告警规则

export const alarm_trigger_template_query = params => {
    return axios.post(`${base}/iot/alarm_trigger_template/query`, qs.stringify(params)).then(res => res.data);
}; //查询告警规则模板
export const alarm_trigger_template_post = params => {
    return axios.post(`${base}/iot/alarm_trigger_template/post`, qs.stringify(params)).then(res => res.data);
}; //添加告警规则模板
export const alarm_trigger_template_put = params => {
    return axios.post(`${base}/iot/alarm_trigger_template/put`, qs.stringify(params)).then(res => res.data);
}; //更新告警规则模板
export const alarm_trigger_template_get = params => {
    return axios.post(`${base}/iot/alarm_trigger_template/get`, qs.stringify(params)).then(res => res.data);
}; //获取告警规则模板信息



export const alarm_trigger_template_delete = params => {

    return axios({
        url: `${base}/iot/alarm_trigger_template/delete`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //删除告警规则模板

export const alarm_trigger_open_or_close_mask = params => {
    return axios.post(`${base}/iot/alarm_trigger/open_or_close_mask`, qs.stringify(params)).then(res => res.data);
}; //切换告警屏蔽开关
export const alarm_trigger_open_or_close = params => {
    return axios.post(`${base}/iot/alarm_trigger/open_or_close`, qs.stringify(params)).then(res => res.data);
}; //切换告警规则开关
export const alarm_trigger_get_mask = params => {
    return axios.post(`${base}/iot/alarm_trigger/get_mask`, qs.stringify(params)).then(res => res.data);
}; //获取告警屏蔽配置
export const alarm_trigger_put_mask = params => {
    return axios.post(`${base}/iot/alarm_trigger/put_mask`, params).then(res => res.data);
}; //修改告警屏蔽配置
export const device_model_query = params => { return axios.post(`${base}/iot/device_model/query`,  qs.stringify(params)).then(res => res.data); };//查询网关型号

export const device_model_post = params => { return axios.post(`${base}/iot/device_model/post`, qs.stringify(params)).then(res => res.data); };//添加网关型号

export const device_model_put = params => { return axios.post(`${base}/iot/device_model/put`,  qs.stringify(params)).then(res => res.data); };//更新网关型号

export const device_model_delete = params => {

    return axios({
        url: `${base}/iot/device_model/delete`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        } 
    }).then(res => res.data);
}; //删除网关型号


export const device_group_query = params => { return axios.post(`${base}/iot/device_group/query`,  qs.stringify(params)).then(res => res.data); };//查询设备分组

export const device_group_post = params => { return axios.post(`${base}/iot/device_group/post`,  qs.stringify(params)).then(res => res.data); };//查询设备分组

export const device_group_put = params => { return axios.post(`${base}/iot/device_group/put`,  qs.stringify(params)).then(res => res.data); };//查询设备分组

export const device_group_delete = params => {

    return axios({
        url: `${base}/iot/device_group/delete`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //删除设备分组


export const device_template_query = params => { return axios.post(`${base}/iot/device_template/query`,  qs.stringify(params)).then(res => res.data); };//查询设备配方

export const device_template_post = params => { return axios.post(`${base}/iot/device_template/post`, params).then(res => res.data); };//新增设备配方

export const device_template_get = params => { return axios.post(`${base}/iot/device_template/get`,  qs.stringify(params)).then(res => res.data); };//获取设备配方

export const device_template_put = params => { return axios.post(`${base}/iot/device_template/put`,  params).then(res => res.data); };//更新设备配方

export const device_state_log_query = params => { return axios.post(`${base}/iot/device_state_log/query`,  qs.stringify(params)).then(res => res.data); };//查询设备上下线
// export const device_state_log_dlexcel = params => { return axios.post(`${base}/iot/device_state_log/dlexcel`,  qs.stringify(params)).then(res => res.data); };//导出设备上下线
export const device_state_log_dlexcel = params => {
    return axios({
        url: `${base}/iot/device_state_log/dlexcel`,
        method: 'post',
        data:qs.stringify(params),
        
        responseType: 'blob'
        
    }).then(res => res.data);};//导出设备上下线

export const device_template_delete = params => {
    console.log(qs.stringify(params))
    return axios({
        url: `${base}/iot/device_template/delete`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
}; //删除设备配方


export const device_type_get = params => { return axios.post(`${base}/iot/device_type/get`,  qs.stringify(params)).then(res => res.data); };//获取设备类型

export const device_type_query = params => { return axios.post(`${base}/iot/device_type/query`,  qs.stringify(params)).then(res => res.data); };//查询设备类型

export const device_type_do_default = params => { return axios.post(`${base}/iot/device_type/do_default`,  qs.stringify(params)).then(res => res.data); };//获取默认设备类型

export const device_type_post = params => {

    return axios({
        url: `${base}/iot/device_type/post`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json' 
        }
    }).then(res => res.data);
};//新增设备类型

export const device_type_put = params => {

    return axios({
        url: `${base}/iot/device_type/put`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
};//更新设备类型
export const device_type_delete = params => {

    return axios({
        url: `${base}/iot/device_type/delete`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
};//删除设备类型


export const device_query = params => { return axios.post(`${base}/iot/device/query`,  qs.stringify(params)).then(res => res.data); };//查询设备列表
export const device_query_mini = params => { return axios.post(`${base}/iot/device/query_mini`,  qs.stringify(params)).then(res => res.data); };//查询设备列表
export const device_delete = params => {

    return axios({
        url: `${base}/iot/device/delete`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
};//删除设备
export const device_put = params => {

    return axios({
        url: `${base}/iot/device/put`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
};//更新设备
export const device_get = params => { return axios.post(`${base}/iot/device/get`,  qs.stringify(params)).then(res => res.data); };//查询设备信息
export const device_attr_query = params => { return axios.post(`${base}/iot/device_attr/query`,  qs.stringify(params)).then(res => res.data); };//查询设备属性
export const device_posts = `${base}/iot/device/post`//添加设备的原生ajax接口
export const device_post = params => {

    return axios({
        url: `${base}/iot/device/post`,
        method: 'post',
        data: params,
        headers: {
            'Content-Type': 'application/json'
        }
    }).then(res => res.data);
};//添加设备
export const device_favorites_add = params => { return axios.post(`${base}/iot/device_favorites/add`,  qs.stringify(params)).then(res => res.data); };//关注设备


export const device_favorites_cancel = params => { return axios.post(`${base}/iot/device_favorites/cancel`,  params).then(res => res.data); };//取消关注设备


export const device_favorites_query = params => { return axios.post(`${base}/iot/device_favorites/query`,   qs.stringify(params)).then(res => res.data); };//关注设备列表

export const device_favorites_top = params => { return axios.post(`${base}/iot/device_favorites/top`,  qs.stringify(params)).then(res => res.data); };//关注设备置顶

export const device_favorites_orderby = params => { return axios.post(`${base}/iot/device_favorites//bottom`,  qs.stringify(params)).then(res => res.data); };//设备排序


export const order_query = params => { return axios.post(`${base}/iot/order/query`,  qs.stringify(params)).then(res => res.data); };//查询订单

export const order_post = params => { return axios.post(`${base}/iot/order/post`,  qs.stringify(params)).then(res => res.data); };//新增订单

export const order_put = params => { return axios.post(`${base}/iot/order/put`,  qs.stringify(params)).then(res => res.data); };//更新订单

export const order_get = params => { return axios.post(`${base}/iot/order/get`,  qs.stringify(params)).then(res => res.data); };//获取订单

export const order_delete = params => { return axios.post(`${base}/iot/order/delete`,  params).then(res => res.data); };//删除订单

export const dict_query = params => { return axios.post(`${base}/iot/dict/query`,  qs.stringify(params)).then(res => res.data); };//查询数据字典

export const dict_sys_query = params => { return axios.post(`${base}/auth/sys/query`,  qs.stringify(params)).then(res => res.data); };

export const dict_sys_put = params => { return axios.post(`${base}/auth/sys/put`,  qs.stringify(params)).then(res => res.data); };

export const dict_post = params => { return axios.post(`${base}/iot/dict/post`,  qs.stringify(params)).then(res => res.data); };//新增数据字典

export const dict_put = params => { return axios.post(`${base}/iot/dict/put`,  qs.stringify(params)).then(res => res.data); };//更新数据字典

export const dict_get = params => { return axios.post(`${base}/iot/dict/get`,  qs.stringify(params)).then(res => res.data); };//获取数据字典

export const dict_delete = params => { return axios.post(`${base}/iot/dict/delete`,   qs.stringify(params)).then(res => res.data); };//删除数据字典

export const unit_query= params => { return axios.post(`${base}/iot/device_unit_type/query`, qs.stringify(params)).then(res => res.data); };//查询数据单位

export const unit_post= params => { return axios.post(`${base}/iot/device_unit_type/post`, qs.stringify(params)).then(res => res.data); };//新增数据单位

export const unit_put= params => { return axios.post(`${base}/iot/device_unit_type/put`, qs.stringify(params)).then(res => res.data); };//更新数据单位

export const unit_get= params => { return axios.post(`${base}/iot/device_unit_type/get`, qs.stringify(params)).then(res => res.data); };//获取数据单位

export const unit_delete= params => { return axios.post(`${base}/iot/device_unit_type/delete`, qs.stringify(params)).then(res => res.data); };//删除数据单位

export const video_query= params => { return axios.post(`${base}/iot/device_video/query`, qs.stringify(params)).then(res => res.data); };//查询视频列表

export const video_post= params => { return axios.post(`${base}/iot/device_video/post`, qs.stringify(params)).then(res => res.data); };//新增视频列表

export const video_put= params => { return axios.post(`${base}/iot/device_video/put`, qs.stringify(params)).then(res => res.data); };//更新视频列表

// export const video_get = params => { return axios.post(`${base}/iot/device_video/get`, qs.stringify(params)).then(res => res.data); };//获取视频列表

export const video_delete= params => { return axios.post(`${base}/iot/device_video/delete`, qs.stringify(params)).then(res => res.data); };//删除视频列表

export const devic_recipe_app_query= params => { return axios.post(`${base}/iot/device_data_recipe_app/query`, qs.stringify(params)).then(res => res.data); };//查询公众号配方

export const devic_recipe_app_put= params => { return axios.post(`${base}/iot/device_data_recipe_app/put`, qs.stringify(params)).then(res => res.data); };//更新公众号配方

export const devic_recipe_app_post= params => { return axios.post(`${base}/iot/device_data_recipe_app/post`, qs.stringify(params)).then(res => res.data); };//新增公众号配方

export const devic_recipe_app_get= params => { return axios.post(`${base}/iot/device_data_recipe_app/get`, qs.stringify(params)).then(res => res.data); };//获取公众号配方

export const devic_recipe_app_delete= params => { return axios.post(`${base}/iot/device_data_recipe_app/delete`, qs.stringify(params)).then(res => res.data); };//删除公众号配方


// export const unit_post = params => {
//     return axios({
//         url: `${base}/iot/device_unit_type/post`,
//         method: 'post',
//         data: params,
//         headers: {
//             'Content-Type': 'application/json'
//         }
//     }).then(res => res.data);
// }; //添加数据单位

export const file_upload = params => {

    return axios({
        url: `${base}/iot/auth/file/upload`,
        method: 'post',
        data:  qs.stringify(params),
        headers: {
            'Content-Type': 'multipart/form-data;boundary=12'
        }
    }).then(res => res.data);
};//上传

export const suggest_post = params => { return axios.post(`${base}/iot/suggest/post`,   qs.stringify(params)).then(res => res.data); };//新增用户反馈
export const suggest_query = params => { return axios.post(`${base}/iot/suggest/query`,   qs.stringify(params)).then(res => res.data); };//查询用户反馈
export const suggest_get = params => { return axios.post(`${base}/iot/suggest/get`,   qs.stringify(params)).then(res => res.data); };//获取用户反馈
export const suggest_delete = params => { return axios.post(`${base}/iot/suggest/delete`,  params).then(res => res.data); };//删除用户反馈
export const suggest_readed = params => { return axios.post(`${base}/iot/suggest/readed`,   qs.stringify(params)).then(res => res.data); };//标记用户反馈为已读



export const device_get_user_count = params => { return axios.post(`${base}/iot/device/get_user_count`,   qs.stringify(params)).then(res => res.data); };//获取用户设备数量


export const device_get_query_user_count = params => { return axios.post(`${base}/iot/device/query_user_count`,   qs.stringify(params)).then(res => res.data); };//获取用户设备在线数量


export const device_recipe_body_list = params => { return axios.post(`${base}/iot/device/list_recipe`,   qs.stringify(params)).then(res => res.data); };//查询数据点
export const device_cmd = params => { return axios.post(`${base}/iot/device/cmd`, params).then(res => res.data); };//执行设备命令
export const device_event_query = params => { return axios.post(`${base}/iot/device_event/query`, qs.stringify(params)).then(res => res.data); };//查询设备上报
export const device_data_log_query = params => { return axios.post(`${base}/iot/device_data_log/query`, params).then(res => res.data); };//查询设备数据点数据 
export const device_data_log_dlexcel = params => {
    return axios({
        url: `${base}/iot/device_data_log/dlexcel`,
        method: 'post',
        data:params,
        
        responseType: 'blob'
        
    }).then(res => res.data);};//导出设备数据点数据
export const device_data_log_query_mutil1 = params => { return axios.post(`${base}/iot/device_data_log/query_mutil`, params).then(res => res.data); };//查询设备数据点数据
export const device_data_log_query_mutil = params => { return axios.post(`${base}/iot/device_data_log/query`, params).then(res => res.data); };//查询设备数据点数据

export const device_my = params => { return axios.post(`${base}/iot/device/my`, qs.stringify(params)).then(res => res.data); };//设备数据统计
export const device_new_up = params => { return axios.post(`${base}/iot/device/new_up`, qs.stringify(params)).then(res => res.data); };//近30天新增设备
export const alarm_log_count = params => { return axios.post(`${base}/iot/alarm_log/count`, qs.stringify(params)).then(res => res.data); };//告警设备数统计
export const device_recipe_picture_query = params => { return axios.post(`${base}/iot/device_recipe_picture/query`, qs.stringify(params)).then(res => res.data); };//查询图标组
export const device_recipe_picture_post = params => { return axios.post(`${base}/iot/device_recipe_picture/post`, params).then(res => res.data); };//新增图标组
export const device_recipe_picture_delete = params => { return axios.post(`${base}/iot/device_recipe_picture/delete`, params).then(res => res.data); };//删除图标组
export const device_recipe_picture_get = params => { return axios.post(`${base}/iot/device_recipe_picture/get`, qs.stringify(params)).then(res => res.data); };//获取图标组
export const device_recipe_picture_put = params => { return axios.post(`${base}/iot/device_recipe_picture/put`, qs.stringify(params)).then(res => res.data); };//获取图标组


export const device_recipe_picture_query_body = params => { return axios.post(`${base}/iot/device_recipe_picture/query_body`, qs.stringify(params)).then(res => res.data); };//查询图标
export const device_recipe_picture_add_body = params => { return axios.post(`${base}/iot/device_recipe_picture/add_body`, params).then(res => res.data); };//新增图标
export const device_recipe_picture_delete_body = params => { return axios.post(`${base}/iot/device_recipe_picture/delete_body`, params).then(res => res.data); };//删除图标
export const device_recipe_picture_get_body = params => { return axios.post(`${base}/iot/device_recipe_picture/get_body`, qs.stringify(params)).then(res => res.data); };//获取图标
export const device_recipe_picture_put_body = params => { return axios.post(`${base}/iot/device_recipe_picture/put_body`, params).then(res => res.data); };//更新图标 


export const device_location_track_query = params => { return axios.post(`${base}/iot/device_location_track/query`, qs.stringify(params)).then(res => res.data); };//查询设备定位轨迹
export const company_update_my = params => { return axios.post(`${base}/auth/company/update_my`, qs.stringify(params)).then(res => res.data); };//更新自己厂商信息
export const company_get_my = params => { return axios.post(`${base}/auth/company/get_my`, qs.stringify(params)).then(res => res.data); };//获取自己厂商信息
export const company_get = params => { return axios.post(`${base}/auth/company/get`, qs.stringify(params)).then(res => res.data); };//获取厂商信息
export const company_put = params => { return axios.post(`${base}/auth/company/put`, qs.stringify(params)).then(res => res.data); };//修改厂商信息
export const company_post = params => { return axios.post(`${base}/auth/company/post`, qs.stringify(params)).then(res => res.data); };//添加厂商信息


export const device_upgrade_query = params => { return axios.post(`${base}/iot/device_upgrade/query`, qs.stringify(params)).then(res => res.data); };//查询设备升级信息
export const device_upgrade_post = params => { return axios.post(`${base}/iot/device_upgrade/post`, qs.stringify(params)).then(res => res.data); };//新增设备升级信息
export const device_upgrade_put = params => { return axios.post(`${base}/iot/device_upgrade/put`, qs.stringify(params)).then(res => res.data); };//修改设备升级信息
export const device_upgrade_delete = params => { return axios.post(`${base}/iot/device_upgrade/delete`, params).then(res => res.data); };//删除设备升级信息
export const device_upgrade_get = params => { return axios.post(`${base}/iot/device_upgrade/get`, qs.stringify(params)).then(res => res.data); };//获取设备升级信息


export const device_argument_query = params => { return axios.post(`${base}/iot/device_argument/query`, qs.stringify(params)).then(res => res.data); };//查询设备参数信息
export const device_argument_post = params => { return axios.post(`${base}/iot/device_argument/post`, qs.stringify(params)).then(res => res.data); };//查询设备参数信息
export const device_argument_put = params => { return axios.post(`${base}/iot/device_argument/put`, qs.stringify(params)).then(res => res.data); };//查询设备参数信息
export const device_argument_delete = params => { return axios.post(`${base}/iot/device_argument/delete`, params).then(res => res.data); };//查询设备参数信息
export const device_argument_get = params => { return axios.post(`${base}/iot/device_argument/get`, qs.stringify(params)).then(res => res.data); };//查询设备参数信息


export const user_reset_child_pass = params => { return axios.post(`${base}/auth/user/reset_child_pass`, qs.stringify(params)).then(res => res.data); };//重置密码


export const alarm_switch_query = params => { return axios.post(`${base}/iot/alarm_switch/query`, qs.stringify(params)).then(res => res.data); };//查询告警声开关
export const alarm_switch_open_or_close = params => { return axios.post(`${base}/iot/alarm_switch/open_or_close`, qs.stringify(params)).then(res => res.data); };//变更告警声开关状态
export const alarm_switch_get = params => { return axios.post(`${base}/iot/alarm_switch/get`, qs.stringify(params)).then(res => res.data); };//获取厂商告警声配置
export const alarm_switch_my = params => { return axios.post(`${base}/iot/alarm_switch/my`, qs.stringify(params)).then(res => res.data); };//获取自己厂商告警声配置


export const alarm_log_queryDevice = params => { return axios.post(`${base}/iot/alarm_log/queryDevices`, qs.stringify(params)).then(res => res.data); };//获取最新告警设备

export const device_upgrade_batch_upgrade = params => { return axios.post(`${base}/iot/device_upgrade/batch_upgrade`, params).then(res => res.data); };//批量更新设备
export const device_upgrade_upgrade_by_condition = params => { return axios.post(`${base}/iot/device_upgrade/upgrade_by_condition`, params).then(res => res.data); };//按固件号更新设备
export const device_batch_download = params => { return axios.post(`${base}/iot/device_upgrade/batch_ota_download`, params).then(res => res.data); };//远程固件下载
export const device_batch_upgrade = params => { return axios.post(`${base}/iot/device_upgrade/batch_ota_upgrade`, params).then(res => res.data); };//远程固件升级

export const user_enable= params => { return axios.post(`${base}/auth/user/enable`, params).then(res => res.data); };//启用用户
export const user_disable= params => { return axios.post(`${base}/auth/user/disable`, params).then(res => res.data); };//禁用用户

export const company_enable= params => { return axios.post(`${base}/auth/company/enable`, params).then(res => res.data); };//启用厂商
export const company_disable= params => { return axios.post(`${base}/auth/company/disable`, params).then(res => res.data); };//禁用厂商


export const device_flow_query= params => { return axios.post(`${base}/iot/device_flow/query`,  qs.stringify(params)).then(res => res.data); };//查询设备流量

export const device_flow_put= params => { return axios.post(`${base}/iot/device_flow/put`,  qs.stringify(params)).then(res => res.data); };//修改设备流量
export const device_flow_get= params => { return axios.post(`${base}/iot/device_flow/get`,  qs.stringify(params)).then(res => res.data); };//获取设备流量

export const device_flow_reset_flow= params => { return axios.post(`${base}/iot/device_flow/reset_flow`,  qs.stringify(params)).then(res => res.data); };//立刻获取设备流量


export const suggest_reply= params => { return axios.post(`${base}/iot/suggest/reply`,  qs.stringify(params)).then(res => res.data); };//获取设备流量


export const device_type_relation_get= params => { return axios.post(`${base}/iot/device_type_relation/get`,  qs.stringify(params)).then(res => res.data); };//查询设备类型属性
export const device_type_relation_put= params => { return axios.post(`${base}/iot/device_type_relation/put`,  params).then(res => res.data); };//查询设备类型属性

export const device_query_location_count= params => { return axios.post(`${base}/iot/device/query_location_count`,  qs.stringify(params)).then(res => res.data); };//查询地区设备数量

export const alarm_log_countLevel= params => { return axios.post(`${base}/iot/alarm_log/countLevel`,  qs.stringify(params)).then(res => res.data); };//告警等级数量统计

export const device_type_relation_queryDevice= params => { return axios.post(`${base}/iot/device_type_relation/queryDevice`,  qs.stringify(params)).then(res => res.data); };//告警等级数量统计



export const terminal_user_query = params => { return axios.post(`${base}/iot/terminal_user/query`,   qs.stringify(params)).then(res => res.data); };//查询终端用户
export const terminal_user_post = params => { return axios.post(`${base}/iot/terminal_user/post`,   qs.stringify(params)).then(res => res.data); };//添加终端用户
export const terminal_user_put = params => { return axios.post(`${base}/iot/terminal_user/put`,   qs.stringify(params)).then(res => res.data); };//修改终端用户
export const terminal_user_get = params => { return axios.post(`${base}/iot/terminal_user/get`,   qs.stringify(params)).then(res => res.data); };//获取终端用户
export const terminal_user_delete = params => { return axios.post(`${base}/iot/terminal_user/delete`,   params).then(res => res.data); };//删除终端用户

export const company_weixin_query = params => { return axios.post(`${base}/auth/company_weixin/query`,   qs.stringify(params)).then(res => res.data); };//查询企业微信账户
export const company_weixin_post = params => { return axios.post(`${base}/auth/company_weixin/post`,   qs.stringify(params)).then(res => res.data); };//新增企业微信账户
export const company_weixin_get = params => { return axios.post(`${base}/auth/company_weixin/get`,   qs.stringify(params)).then(res => res.data); };//获取企业微信账户
export const company_weixin_put = params => { return axios.post(`${base}/auth/company_weixin/put`,   qs.stringify(params)).then(res => res.data); };//编辑企业微信账户
export const company_weixin_delete = params => { return axios.post(`${base}/auth/company_weixin/delete`,   params).then(res => res.data); };//删除企业微信账户


export const alarm_user_weixin_query = params => { return axios.post(`${base}/auth/alarm_user_weixin/query`,    qs.stringify(params)).then(res => res.data); };//查询告警用户微信信息
export const alarm_user_weixin_delete = params => { return axios.post(`${base}/auth/alarm_user_weixin/delete`,   params).then(res => res.data); };//删除告警用户微信信息


export const user_weixin_query = params => { return axios.post(`${base}/auth/user_weixin/queryWXUser`,   qs.stringify(params)).then(res => res.data); };//获取公众号信息
export const company_weixin_my = params => { return axios.post(`${base}/auth/company_weixin/my`,   params).then(res => res.data); };//查询公众号用户列表信息


export const device_addSnAndPsd = params => { return axios.post(`${base}/iot/device/addSnAndPsd`, qs.stringify(params)).then(res => res.data); };//添加SN和密码
export const device_querysnpsw = params => { return axios.post(`${base}/iot/device/querysnpsw `, qs.stringify(params)).then(res => res.data); };//添加SN和密码
export const device_delSnAndPsd = params => { return axios.post(`${base}/iot/device/delSnAndPsd`, qs.stringify(params)).then(res => res.data); };//添加SN和密码


export const employee_bind_customer_query = params => { return axios.post(`${base}/iot/employee_bind_customer/query`, qs.stringify(params)).then(res => res.data); };//查某一个员工的绑定客户
export const employee_bind_customer_batchBindCustomer = params => { return axios.post(`${base}/iot/employee_bind_customer/batchBindCustomer`,params).then(res => res.data); };//给某一个员工绑定的客户列表


export const device_data_recipe_top = params => { return axios.post(`${base}/iot/device_data_recipe/top`, qs.stringify(params)).then(res => res.data); };
export const device_data_recipe_down = params => { return axios.post(`${base}/iot/device_data_recipe/down`, qs.stringify(params)).then(res => res.data); };
export const device_data_recipe_orderby = params => { return axios.post(`${base}/iot/device_data_recipe/orderby`, params).then(res => res.data); };


export const device_send_auth_code= params => { return axios.post(`${base}/iot/device/send_auth_code`, qs.stringify(params)).then(res => res.data); };//请求删除设备验证码


export const get_random_code= params => { return axios.get(`${base}/auth/get_random_code`, qs.stringify(params)).then(res => res.data); };//获取验证码
export const check_random_code= params => { return axios.post(`${base}/auth/check_random_code`, qs.stringify(params)).then(res => res.data); };//校验验证码

export const device_user_bind_queryUser = params => { return axios.post(`${base}/iot/device_user_bind/queryUser`, qs.stringify(params)).then(res => res.data); };//查询所有绑定用户

export const device_user_bind_auth = params => { return axios.post(`${base}/iot/device_user_bind/auth`, qs.stringify(params)).then(res => res.data); };//编辑所有绑定用户
export const device_user_bind_queryDevices = params => { return axios.post(`${base}/iot/device_user_bind/queryDevices`, qs.stringify(params)).then(res => res.data); };//查询所有绑定用户


export const device_user_bind_removeAuth = params => { return axios.post(`${base}/iot/device_user_bind/removeAuth`, qs.stringify(params)).then(res => res.data); };//移除绑定用户



export const update_device_sn = params => { return axios.post(`${base}/iot/device/update_device_sn`, qs.stringify(params)).then(res => res.data); };//移除绑定用户




export const conversation_post = params => { return axios.post(`${base}/iot/conversation/post`, params).then(res => res.data); };//创建会话
export const conversation_query = params => { return axios.post(`${base}/iot/conversation/query`, qs.stringify(params)).then(res => res.data); };//查询会话列表
export const conversation_put = params => { return axios.post(`${base}/iot/conversation/put`, params).then(res => res.data); };//修改会话列表
export const conversation_delete = params => { return axios.post(`${base}/iot/conversation/delete`, params).then(res => res.data); };//删除会话
export const message_query = params => { return axios.post(`${base}/iot/message/query`, qs.stringify(params)).then(res => res.data); };//查询聊天记录
export const message_post = params => { return axios.post(`${base}/iot/message/post`, params).then(res => res.data); };//发送聊天信息
export const conversation_query_my = params => { return axios.post(`${base}/iot/conversation/query_my`, qs.stringify(params)).then(res => res.data); };//查询我的会话列表


export const device_getDeviceAlarmNum = params => { return axios.post(`${base}/iot/device/getDeviceAlarmNum`, qs.stringify(params)).then(res => res.data); };//设备告警点数据


export const user_temp_data_query = params => { return axios.post(`${base}/iot/user_temp_data/query`, qs.stringify(params)).then(res => res.data); };//搜索记录查询
export const user_temp_data_post = params => { return axios.post(`${base}/iot/user_temp_data/post`, qs.stringify(params)).then(res => res.data); };//添加记录查询
export const user_temp_data_delete = params => { return axios.post(`${base}/iot/user_temp_data/delete`, qs.stringify(params)).then(res => res.data); };//删除记录查询


export const device_update_device_type = params => { return axios.post(`${base}/iot/device/update_device_type`,params).then(res => res.data); };//批量修改设备类型
export const device_update_ternimal_user = params => { return axios.post(`${base}/iot/device/update_ternimal_user`, params).then(res => res.data); };//批量修改设备类型
export const device_alarm_list = params => { return axios.post(`${base}/iot/device/device_alarm_list`, params).then(res => res.data); };//批量修改告警开关
// export const alarm_user_weixin_post = params => { return axios.post(`${base}/auth/company_weixin/post`,   params).then(res => res.data); };//添加公众号

export const user_weixin_delete = params => { return axios.post(`${base}/auth/user_weixin/delete `, qs.stringify(params)).then(res => res.data); };//批量修改设备类型

export const device_state_log_daily_count = params => { return axios.post(`${base}/iot/device_state_log/daily_count `, qs.stringify(params)).then(res => res.data); };//近30天设备在线数据
export const device_count_for_hdip = params => { return axios.post(`${base}/iot/device/count_for_hdip_top`, qs.stringify(params)).then(res => res.data); };//监控大屏统计

export const device_area_new_up = params => { return axios.post(`${base}/iot/device/area_new_up`, qs.stringify(params)).then(res => res.data); };//行业增长
export const device_guild_new_up = params => { return axios.post(`${base}/iot/device/guild_new_up`, qs.stringify(params)).then(res => res.data); };//区域增长
export const device_flow_count_device_over_flow = params => { return axios.post(`${base}/iot/device_flow/count_device_over_flow`, qs.stringify(params)).then(res => res.data); };//流量告警设备数量


export const send_auth_pass_code= params => { return axios.post(`${base}/auth/send_auth_pass_code`, qs.stringify(params)).then(res => res.data); };//当前用户验证码。

export const device_change_user= params => { return axios.post(`${base}/iot/device/change_user`, qs.stringify(params)).then(res => res.data); };//设备转移


export const query_device_user= params => { return axios.post(`${base}/auth/user/query_device_user`, qs.stringify(params)).then(res => res.data); };//设备所属用户

export const device_company_group_query= params => { return axios.post(`${base}/iot/device_company_group/query`, qs.stringify(params)).then(res => res.data); };//查询设备分组
export const device_company_group_query_slave= params => { return axios.post(`${base}/iot/device_company_group/query_group_slave`, qs.stringify(params)).then(res => res.data); };//查询设备从机分组
export const device_company_group_add= params => { return axios.post(`${base}/iot/device_company_group/add_to_group`, qs.stringify(params)).then(res => res.data); };//添加分组设备
export const device_company_group_delete= params => { return axios.post(`${base}/iot/device_company_group/delete`, qs.stringify(params)).then(res => res.data); };//移出分组

export const query_slave_list= params => { return axios.post(`${base}/iot/device_slave/query`, qs.stringify(params)).then(res => res.data); };//从机列表
export const device_slave_list= params => { return axios.post(`${base}/iot/device_slave/get_device_slave`, qs.stringify(params)).then(res => res.data); };//从机列表


export const device_device_alarm= params => { return axios.post(`${base}/iot/device/device_alarm`, qs.stringify(params)).then(res => res.data); };//设备告警控制

export const companytree_query = params => { return axios.post(`${base}/auth/company/query_tree`, qs.stringify(params)).then(res => res.data)}//查询组织客户关系图

export const my_type_filter = params => { return axios.post(`${base}/iot/conversation/type_list`, qs.stringify(params)).then(res => res.data)}//我的工单类型筛选
export const device_device_alarm_list= params => { return axios.post(`${base}/iot/device/device_alarm_list`, params).then(res => res.data)}//批量修改告警开关

export const app_version_query= params => { return axios.post(`${base}/iot/app_version/query`, qs.stringify(params)).then(res => res.data); };//查询版本
export const app_version_get= params => { return axios.post(`${base}/iot/app_version/get`, qs.stringify(params)).then(res => res.data); };//版本详情
export const app_version_post= params => { return axios.post(`${base}/iot/app_version/post`, qs.stringify(params)).then(res => res.data); };//新增版本
export const app_version_put= params => { return axios.post(`${base}/iot/app_version/put`, qs.stringify(params)).then(res => res.data); };//修改版本
export const app_version_delete= params => { return axios.post(`${base}/iot/app_version/delete`, qs.stringify(params)).then(res => res.data); };//删除版本
export const app_version_check_new_version= params => { return axios.post(`${base}/iot/app_version/check_new_version`, qs.stringify(params)).then(res => res.data); };//检查版本
export const app_version_get_app_path= params => { return axios.post(`${base}/iot/app_version/get_app_path`, qs.stringify(params)).then(res => res.data); };//下载APP

export const get_certificate= params => { return axios.get(`${base}/auth/license/lic_info`, qs.stringify(params)).then(res => res.data); };//获取证书信息
export const license_query= params => { return axios.get(`${base}/auth/license/get_lic_file`, qs.stringify(params)).then(res => res.data); };//查询证书
export const license_edit= params => { return axios.post(`${base}/auth/license/atv_lic_file`, qs.stringify(params)).then(res => res.data); };//编辑证书


export const device_data_recipe_copy= params => { return axios.post(`${base}/iot/device_data_recipe/copy`, qs.stringify(params)).then(res => res.data); };//复制数据配方
export const device_template_copy= params => { return axios.post(`${base}/iot/device_template/copy`, qs.stringify(params)).then(res => res.data); };//复制设备配方

export const configurat_category_query= params => { return axios.post(`${base}/iot/configurat_category/query`, qs.stringify(params)).then(res => res.data); };//svg分类管理
export const configurat_category_post= params => { return axios.post(`${base}/iot/configurat_category/post`, qs.stringify(params)).then(res => res.data); };
export const configurat_category_put= params => { return axios.post(`${base}/iot/configurat_category/put`, qs.stringify(params)).then(res => res.data); };
export const configurat_category_get= params => { return axios.post(`${base}/iot/configurat_category/get`, qs.stringify(params)).then(res => res.data); };
export const configurat_category_delete= params => { return axios.post(`${base}/iot/configurat_category/delete`, qs.stringify(params)).then(res => res.data); };


export const configurat_res_query= params => { return axios.post(`${base}/iot/configurat_res/query`, qs.stringify(params)).then(res => res.data); };//svg管理
export const configurat_res_post= params => { return axios.post(`${base}/iot/configurat_res/post`, qs.stringify(params)).then(res => res.data); };
export const configurat_res_put= params => { return axios.post(`${base}/iot/configurat_res/put`, qs.stringify(params)).then(res => res.data); };
export const configurat_res_get= params => { return axios.post(`${base}/iot/configurat_res/get`, qs.stringify(params)).then(res => res.data); };
export const configurat_res_delete= params => { return axios.post(`${base}/iot/configurat_res/delete`, qs.stringify(params)).then(res => res.data); };


export const register_query= params => { return axios.post(`${base}/iot/device_data_recipe_app_cmd/query`, qs.stringify(params)).then(res => res.data); };//查询简码
export const register_post= params => { return axios.post(`${base}/iot/device_data_recipe_app_cmd/post`, qs.stringify(params)).then(res => res.data); };//新增简码
export const register_put= params => { return axios.post(`${base}/iot/device_data_recipe_app_cmd/put`, qs.stringify(params)).then(res => res.data); };//修改简码
export const register_get= params => { return axios.post(`${base}/iot/device_data_recipe_app_cmd/get`, qs.stringify(params)).then(res => res.data); };//简码详情
export const register_delete= params => { return axios.post(`${base}/iot/device_data_recipe_app_cmd/delete`, qs.stringify(params)).then(res => res.data); };//删除简码

export const template_ui_query = params => { return axios.post(`${base}/iot/device_template_ui/query`, qs.stringify(params)).then(res => res.data); };//查询UI模板
export const template_ui_post = params => { return axios.post(`${base}/iot/device_template_ui/post`, qs.stringify(params)).then(res => res.data); };//新增UI模板
export const template_ui_put = params => { return axios.post(`${base}/iot/device_template_ui/put`, qs.stringify(params)).then(res => res.data); };//修改UI模板
export const template_ui_get = params => { return axios.post(`${base}/iot/device_template_ui/get`, qs.stringify(params)).then(res => res.data); };//获取UI模板
export const template_ui_delete = params => { return axios.post(`${base}/iot/device_template_ui/delete`, qs.stringify(params)).then(res => res.data); };//删除UI模板

export const template_ui_query_cmd = params => { return axios.post(`${base}/iot/device_template_ui_cmd/query`, qs.stringify(params)).then(res => res.data); };//查询UI简码
export const template_ui_post_cmd = params => { return axios.post(`${base}/iot/device_template_ui_cmd/post`, qs.stringify(params)).then(res => res.data); };//新增UI简码
export const template_ui_put_cmd = params => { return axios.post(`${base}/iot/device_template_ui_cmd/put`, qs.stringify(params)).then(res => res.data); };//修改UI简码
export const template_ui_get_cmd = params => { return axios.post(`${base}/iot/device_template_ui_cmd/get`, qs.stringify(params)).then(res => res.data); };//获取UI简码
export const template_ui_delete_cmd = params => { return axios.post(`${base}/iot/device_template_ui_cmd/delete`, qs.stringify(params)).then(res => res.data); };//删除UI简码

export const device_template_ui_company_query = params => { return axios.post(`${base}/iot/device_template_ui_company/query`, qs.stringify(params)).then(res => res.data); };
export const device_template_ui_company_post = params => { return axios.post(`${base}/iot/device_template_ui_company/post`, qs.stringify(params)).then(res => res.data); };
export const device_template_ui_company_delete = params => { return axios.post(`${base}/iot/device_template_ui_company/delete`, qs.stringify(params)).then(res => res.data); };

export const check_device_template = params => { return axios.post(`${base}/iot/device_data_recipe_app/check_device_template`, qs.stringify(params)).then(res => res.data); };//设备模板UI校验

export const device_data_analyse = params => { return axios.post(`${base}/iot/device_data_analyse/data_sum`, qs.stringify(params)).then(res => res.data); };//电量统计接口
export const device_data_analyse_query = params => { return axios.post(`${base}/iot/device_data_analyse/query`, qs.stringify(params)).then(res => res.data); };//电量统计接口

export const device_data_analyse_dataCount = params => { return axios.post(`${base}/iot/device_data_analyse/data_count`, qs.stringify(params)).then(res => res.data); };//温度统计
export const device_data_temperature_log = params => { return axios.post(`${base}/iot/device_data_temperature_log/data_sum`, qs.stringify(params)).then(res => res.data); };//温度统计
export const device_data_temperature_log_query = params => { return axios.post(`${base}/iot//device_data_temperature_log/query`, qs.stringify(params)).then(res => res.data); };//温度统计

export const cms_category_query= params => { return axios.post(`${base}/cms/cms_category/query`, qs.stringify(params)).then(res => res.data); };//文章类型列表
export const cms_category_post= params => { return axios.post(`${base}/cms/cms_category/post`, params).then(res => res.data); };//新增类型列表
export const cms_category_put= params => { return axios.post(`${base}/cms/cms_category/put`,params).then(res => res.data); };//修改类型列表
export const cms_category_delete= params => { return axios.post(`${base}/cms/cms_category/delete`, qs.stringify(params)).then(res => res.data); };//删除类型列表


export const cms_article_query= params => { return axios.post(`${base}/cms/cms_article/query`,  qs.stringify(params)).then(res => res.data); };//查询文章
export const cms_article_post= params => { return axios.post(`${base}/cms/cms_article/post`, params).then(res => res.data); };//新增文章
export const cms_article_put= params => { return axios.post(`${base}/cms/cms_article/put`,params).then(res => res.data); };//修改文章
export const cms_article_get= params => { return axios.post(`${base}/cms/cms_article/get`,qs.stringify(params)).then(res => res.data); };//获取文章详情
export const cms_article_delete= params => { return axios.post(`${base}/cms/cms_article/delete`, qs.stringify(params)).then(res => res.data); };//删除文章


export const cms_order_query= params => { return axios.post(`${base}/cms/cms_order/query`, qs.stringify(params)).then(res => res.data); };//订单查询
export const cms_order_delete= params => { return axios.post(`${base}/cms/cms_order/delete`, qs.stringify(params)).then(res => res.data); };//订单删除

export const cms_comment_query= params => { return axios.post(`${base}/cms/cms_comment/query`, qs.stringify(params)).then(res => res.data); };//评论列表
export const cms_comment_post= params => { return axios.post(`${base}/cms/cms_comment/post`, qs.stringify(params)).then(res => res.data); };//评论列表
export const cms_comment_put= params => { return axios.post(`${base}/cms/cms_comment/put`, qs.stringify(params)).then(res => res.data); };//评论列表
export const cms_comment_get= params => { return axios.post(`${base}/cms/cms_comment/get`, qs.stringify(params)).then(res => res.data); };//评论列表
export const cms_comment_delete= params => { return axios.post(`${base}/cms/cms_comment/delete`, qs.stringify(params)).then(res => res.data); };//评论列表

export const image_file_upload= params => { return axios.post(`${base}/auth/image_file/upload`, qs.stringify(params)).then(res => res.data); };//图片上传
export const cms_article_set_status= params => { return axios.post(`${base}/cms/cms_article/set_status`, qs.stringify(params)).then(res => res.data); };//审核文章

export const conversation_data_sum = params => { return axios.post(`${base}/iot/conversation/data_sum`, qs.stringify(params)).then(res => res.data); };//首页问题走势图

// export const requestLogin = params => { return axios.post(`${base}/login`, params).then(res => res.data); };

// export const getUserList = params => { return axios.get(`${base}/user/list`, { params: params }); };

// export const getUserListPage = params => { return axios.get(`${base}/user/listpage`, { params: params }); };

// export const removeUser = params => { return axios.get(`${base}/user/remove`, { params: params }); };

// export const batchRemoveUser = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };

// export const editUser = params => { return axios.get(`${base}/user/edit`, { params: params }); };


// export const addUser = params => { return axios.get(`${base}/user/add`, { params: params }); };